package stu.khy.ssm.service.impl;

import javax.annotation.Resource;
import org.springframework.stereotype.Service;

import stu.khy.ssm.dao.DevUserMapper;
import stu.khy.ssm.entity.DevUser;
import stu.khy.ssm.service.DevUserService;

@Service
public class DevUserServiceImpl implements DevUserService {
	/* @Autowired */
	@Resource
    
	private DevUserMapper userMapper;
	public void setUserMapper(DevUserMapper userMapper) {
	     this.userMapper = userMapper;
}
	@Override
	public DevUser login(String devCode, String devPassword) {
		// TODO Auto-generated method stub
		DevUser user=null;
		user=userMapper.login(devCode);
		if(user!=null) {
			if(user.getDevPassword().equals(devPassword)) {
			   user=null;	
			}
		}
		return userMapper.login(devCode);
	}

}
